Welcome Guest | Sign in | Register

Home > C Programming > Inbuilt Functions > Questions and Answers

01. string constants should be enclosed with?
A. single quotes B. double quotes
C. brackets D. None of these

Answer and Explanation

Answer: double quotes

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum
02. How would you round off a value from 1.66 to 2.0?
A. ceil(1.66) B. floor(1.66)
C. roundup(1.66) D. roundto(1.66)

Answer and Explanation

Answer: ceil(1.66)

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum
03. What will the code below print when executed?
Code:
double x = -3.5, y = 3.5;
printf( "%.0f : %.0f\n", ceil( x ), ceil( y ) );
printf( "%.0f : %.0f\n", floor( x ), floor( y ) );
ceil =>rounds up 3.2=4 floor =>rounds down 3.2=3 
A. -3 : 4
-4 : 3
B. -4 : 4
-3 : 3 
C. -4 : 3
-4 : 3 
D. -4 : 3
-3 : 4 
E. -3 : 3
-4 : 4

Answer and Explanation

Answer: -3 : 4
-4 : 3

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum
04. Which one of the following will read a character from the keyboard and will store it in the variable c?
A. c = getc(); B. getc( &c );
C. c = getchar( stdin ); D. getchar( &c )
E. c = getchar();

Answer and Explanation

Answer: c = getchar();

Explanation:
There is no explanation...

Report Errors

Name:

Loading...

VView Answer | RReport | DDiscuss in Forum



Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.